home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINFALL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  987 b   |  53 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  17. //
  18. // WaterFallWindows()
  19. //
  20. // Waterfalls the windows
  21. //
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.  
  24. void FusionWindow::WaterFallWindows()
  25. {
  26.   if (NumberOfWindows<2)
  27.     return;
  28.  
  29.   int CurrentY=1;
  30.   int CurrentHeight=BlazeClass::WhatHeight()-2;
  31.  
  32.   for (int i=NumberOfWindows-1;i>=0;i--)
  33.   {
  34.     Windows[i]->X=0;
  35.     Windows[i]->Y=CurrentY;
  36.     Windows[i]->Width=BlazeClass::WhatWidth();
  37.     Windows[i]->Height=CurrentHeight;
  38.  
  39.     CurrentY++;
  40.     CurrentHeight--;
  41.  
  42.     if (CurrentHeight<5)
  43.     {
  44.       CurrentY=1;
  45.       CurrentHeight=BlazeClass::WhatHeight()-2;
  46.     }
  47.   }
  48.  
  49.   RemoveAllMenus();
  50.   RefreshWindows();
  51. }
  52.  
  53.